<script setup>

import {useStore} from 'vuex'
let store = useStore()
let info = localStorage.getItem('userInfo')
if(info){
  let uinfo = JSON.parse(info)
  store.commit('user/initInfoMut',uinfo)  //初始化用户信息
  store.dispatch('cart/cartInitAct',uinfo._id) //初始化购物车
}

let list = localStorage.getItem('addressList')
if(list){
  store.commit('address/addressInitMut',JSON.parse(list))
}

// BOM
console.log(location.hash);
</script>

<template>
  <div>
    <router-view></router-view>
  </div>
</template>

<style scoped>

</style>
